package cn.java75.aop2;

import cn.java75.aop.entity.Student;
import cn.java75.aop2.serivce.StudentService;
import cn.java75.aop2.serivce.StudentServiceI;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestAopAno {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("aop.xml");
        System.out.println(Arrays.toString( ac.getBeanDefinitionNames()));
        StudentServiceI s = ac.getBean(StudentServiceI.class);

        Student st=new Student();
        st.setSname("laowu");
        int add = s.add(st);
        System.out.println(add);
    }
}
